package com.xc.hotelmgr.webapi.modules.ht.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xc.hotelmgr.webapi.common.utils.PageUtils;
import com.xc.hotelmgr.webapi.common.utils.Query;

import com.xc.hotelmgr.webapi.modules.ht.dao.HtHotelinfoDao;
import com.xc.hotelmgr.webapi.modules.ht.entity.HtHotelinfoEntity;
import com.xc.hotelmgr.webapi.modules.ht.service.HtHotelinfoService;


@Service("htHotelinfoService")
public class HtHotelinfoServiceImpl extends ServiceImpl<HtHotelinfoDao, HtHotelinfoEntity> implements HtHotelinfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HtHotelinfoEntity> page = this.page(
                new Query<HtHotelinfoEntity>().getPage(params),
                new QueryWrapper<HtHotelinfoEntity>()
        );

        return new PageUtils(page);
    }
    @Override
    public  PageUtils sqlQueryPage(Map<String, Object> params) {
        IPage<HtHotelinfoEntity> page = new Query<HtHotelinfoEntity>().getPage(params);
        List<HtHotelinfoEntity> list = null;
        params.put("page",page);
        list = baseMapper.sqlQueryPage(params);
        return new PageUtils(page, list);
    }

    @Override
    public HtHotelinfoEntity getWDById(Object id) {
        return baseMapper.getWDById(id);
    }

//    @Override
//    public List<HtHotelinfoEntity> sqlSelectByCityBrand(Object district, Object brands) {
//        return baseMapper.sqlSelectByCityBrand(district,brands);
//    }
}